# !/usr/bin/env python
# -*- coding: utf-8 -*-
# @File  : 组合提示词-字符串提示词组合.py
# @Author: dongguangwen
# @Date  : 2025-03-23 17:20
from langchain_core.prompts import PromptTemplate

prompt = (
    PromptTemplate.from_template("Tell me a joke about {topic}")
    + ", make it funny"
    + "\n\nand in {language}"
)

print(prompt)

ret = prompt.format(topic="sports", language="spanish")
print(ret)

"""
input_variables=['language', 'topic'] input_types={} partial_variables={} template='Tell me a joke about {topic}, make it funny\n\nand in {language}'
Tell me a joke about sports, make it funny

and in spanish
"""
